package com.onlineshopping.mapper;

import com.onlineshopping.entity.Item;
import com.onlineshopping.entity.ShoppingCar;
import com.onlineshopping.vo.ItemVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author laisir
 * @date 2024/9/24
 */
@Mapper
public interface ShoppingCarMapper {
    void addToCart(String username, ItemVo item);

    Integer getCount(String username);

    void clear(String username);

    List<ShoppingCar> getAll(String username);

    List<ShoppingCar> getOrders(String username);

    int remove(String username, String itemName);

    void pay(String username);

    List<ShoppingCar> getOrdersByUser(String username);

    List<ShoppingCar> getAllOrders();
}
